package com.wwtech.epp.ui.activity.work.module;

import com.wwtech.epp.data.api.HttpAPIWrapper;
import com.wwtech.epp.ui.activity.base.ActivityScope;
import com.wwtech.epp.ui.activity.work.AddCommentActivity;
import com.wwtech.epp.ui.activity.work.contract.AddCommentContract;
import com.wwtech.epp.ui.activity.work.presenter.AddCommentPresenter;

import dagger.Module;
import dagger.Provides;

/**
 * @author hzp
 * @Package com.wwtech.epp.ui.activity.work
 * @Description: The moduele of AddCommentActivity, provide field for AddCommentActivity
 * @date 2017/10/12 20:09:45
 */
@Module
public class AddCommentModule {
    private final AddCommentContract.View mView;


    public AddCommentModule(AddCommentContract.View view) {
        this.mView = view;
    }

    @Provides
    @ActivityScope
    public AddCommentPresenter provideAddCommentPresenter(HttpAPIWrapper httpAPIWrapper, AddCommentActivity mActivity) {
        return new AddCommentPresenter(httpAPIWrapper, mView, mActivity);
    }

    @Provides
    @ActivityScope
    public AddCommentActivity provideAddCommentActivity() {
        return (AddCommentActivity) mView;
    }
}